﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class AssetManager : MonoBehaviour
{

    public List<GameObject> mAllGos = new List<GameObject>();

    static private AssetManager _instance;

    void Awake()
    {
        _instance = this;
    }

    static public AssetManager Instance
    {
        get
        {
            return _instance;
        }
    }

    // Use this for initialization
    void Start ()
    {
        _instance = this;
    }

    // Update is called once per frame
    void Update ()
    {
	
	}

    /// <summary>
    /// 获取Resource实例对象
    /// </summary>
    /// <param name="name"></param>
    /// <returns></returns>
    public T GetResourceObject<T>(string name) where T : UnityEngine.Object
    {
        T o = Resources.Load<T>(name);

        return o as T;
    }

}
